#!/usr/bin/env python
#coding=utf-8
import xmlrpclib


_url    = "http://192.168.100.64:2633/RPC2"
_user   = "oneadmin"
_passwd = "8f05671d1326cfc2c0b2facc806af4b7"

_auth = ':'.join([_user,_passwd])

server = xmlrpclib.ServerProxy(_url)

#vn_pool = server.one.vnpool.info(_auth,-1,-1,-1)
##print vn_pool
#
#template_pool = server.one.templatepool.info(_auth,-1,-1,-1)
##print template_pool[1]
#
## 查询虚拟机信息
#vm_pool = server.one.vmpool.info(_auth,-1,-1,-1,-1)[1]
##print vm_pool
#
## 创建虚拟机

vm_info = server.one.vm.info(_auth,1)
print vm_info[1]




